﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RATSharp.Validator
{
    class URLInputValidator : IInputValidator<string>
    {
        public bool validate(string input, out string output)
        {
            output = null;

            Uri parsedUri;
            if (Uri.TryCreate(input, UriKind.RelativeOrAbsolute, out parsedUri))
            {
                output = parsedUri.ToString();
                return true;
            }
            return false;
        }


    }
}
